﻿#pragma once

#include "Ability/EditorAbilityView.h"
#include "EditorAbilityGroupView.m.h"

class RWidget;
class REditorAbilityGroupViewModel;
class REditorSplitableLayoutView;

RCLASS(ExtraHeader=["Widgets/Splitable/EditorSplitableLayoutView.h"])
class REditorAbilityGroupView : public REditorAbilityView
{
    ROBJECT

public:
    virtual void BindViewModel(TSharedObjectPtr<REditorAbilityViewModel> InViewModel) override;
    virtual void CreateWidget(TSharedObjectPtr<RWidget> InParent) override;
    virtual void FillOperations(TSharedObjectPtr<RWidget> InTitleBar) override;
protected:
    TWeakObjectPtr<REditorAbilityGroupViewModel>  GroupViewModel;

    TVector<TSharedObjectPtr<REditorAbilityView>> SubAbilityViews;

protected:
    RFIELD()
    TSharedObjectPtr<REditorSplitableLayoutView> Layout;

    void FillAbilityWidget(RObjectPtr InAbilityView,TSharedObjectPtr<RWidget> InParentWidget);
};